//Specifying a targetCountry will declare war on that country based on the setup parameter when it hits zero.
//If units are just being moved you don't need a targetCountry or a setup parameter.
//Your landAssets + hqAsset should not be more than all possbile land hexes within a range of 2 of the target hex
//I suggest trying to make land gather groups of 6 units or less.
//Scripts are processed top down. A unit that gets an order from a higher script will not be considered for lower scripts

//move German forces to Denmark
$GatherLand
if_Date=9/1/1939
if_Country=42
if_Surrender=true
landUnitInRadius=154,67,1,0,Axis
lifespan=tillTrigger
actionCountry=6
targetCountry=17
landAssets=2
setup=0
xyArea=154,67
$End

//German forces attack Belgium
$GatherLand
if_Date=9/1/1939
lifespan=tillTrigger
if_Country=42
if_Surrender=true
actionCountry=6
landAssets=10
hqAsset
setup=6
xyArea=146,59
$End

//German forces attack Belgium
$GatherLand
if_Date=4/17/1940
if_Country=42
if_Surrender=true
lifespan=tillTrigger
actionCountry=6
targetCountry=12
landAssets=10
hqAsset
attackOnlyInClear
setup=0
xyArea=146,59
$End

//German forces attack Netherlands
$GatherLand
if_Date=9/1/1939
if_Country=42
if_Surrender=true
lifespan=tillTrigger
actionCountry=6
landAssets=8
hqAsset
setup=4
xyArea=148,60
$End

//German forces attack Netherlands
$GatherLand
if_Date=4/17/1940
if_Country=42
if_Surrender=true
lifespan=tillTrigger
actionCountry=6
targetCountry=36
landAssets=8
hqAsset
attackOnlyInClear
setup=0
xyArea=148,60
$End

//move German forces to Luxemburg
$GatherLand
if_Date=5/1/1940
lifespan=tillTrigger
actionCountry=6
targetCountry=31
landAssets=1
setup=1
attackOnlyInClear
xyArea=145,55
$End

//move German attack Vichy to invade Spain Plan 2
$GatherLand
if_Date=3/15/1940
if_Country=2
if_Surrender=true
if_Plan=2
lifespan=tillTrigger
actionCountry=6
targetCountry=54
landAssets=6
hqAsset
setup=1
xyArea=142,48
$End

//setup to invade Yugoslavia
$GatherLand
if_Date=3/15/1941
if_Plan=1
landUnitInRadius=167,43,5,4,Axis
lifespan=tillTrigger
actionCountry=6
targetCountry=57
landAssets=1
hqAsset
setup=0
xyArea=170,46
$End

//setup to invade Yugoslavia
$GatherLand
if_Date=1/1/1939
if_Plan=2
if_Country=45
if_Surrender=true
landUnitInRadius=167,43,5,4,Axis
lifespan=tillTrigger
actionCountry=6
targetCountry=57
landAssets=1
hqAsset
setup=0
xyArea=170,46
$End


//Germany waits for units to arrive then DOWs on Greece after Yugoslavia falls Plan #2
$GatherLand
if_Date=5/1/1941
if_Country=57
if_Surrender=true
if_Plan=2
landUnitInRadius=174,32,5,2,Axis
lifespan=once
actionCountry=6
targetCountry=22
landAssets=1
hqAsset
setup=0
xyArea=174,33
$End

//UK Invades Syria
$GatherLand
if_Date=6/15/1941
if_Country=56
if_Alliance=Neutral
xyControl=198,13,Allies
lifespan=tillTrigger
actionCountry=1
targetCountry=56
setup=3
landAssets=2
xyArea=200,15
$End

//UK invades Iraq if their loyalty goes Axis
//Iraq loyalty goes Axis when 186,10 is Axis and there is a unit in Kuwait ~1941 they get a unit there via an event
$GatherLand
if_Date=1/1/1939
landUnitInRadius=219,6,1,3,Allies
xyControl=219,6,Allies
xyControl=186,10,Axis
lifespan=tillTrigger
actionCountry=1
targetCountry=27
landAssets=1
setup=1
xyArea=219,6
$End

//Invade Spain Plan #2
$GatherLand
if_Date=6/1/1940
if_Country=54
if_Surrender=true
if_Plan=2
landUnitInRadius=138,39,8,4,Axis
lifespan=tillTrigger
actionCountry=6
targetCountry=45
landAssets=1
hqAsset
setup=0
xyArea=135,40
$End

//move German forces invade Portugal after Gibraltar falls
$GatherLand
if_Date=1/1/1939
if_Country=45
if_Surrender=true
if_Plan=2
//gibraltar
xyControl=127,21,Axis
lifespan=tillTrigger
actionCountry=6
targetCountry=43
landAssets=5
hqAsset
setup=1
xyArea=126,28
$End

//#############################################
//1941 Declare war USSR plan 1
$GatherLand
if_Date=6/1/1941
if_Country=57
if_Surrender=true
if_Plan=1
//Axis have enough land units around Warsaw
landUnitInRadius=173,60,30,8,Axis
lifespan=tillTrigger
actionCountry=6
targetCountry=4
landAssets=1
attackOnlyInClear
setup=0
xyArea=172,67
$End

//Preparation move
//Move unit to Russian border
$GatherLand
if_Date=1/1/1939
if_Country=2
if_Surrender=true
if_Plan=1
lifespan=tillTrigger
actionCountry=6
landAssets=15
setup=1
xyArea=174,58
$End

//Preparation move
//Move unit to Russian border
$GatherLand
if_Date=1/1/1939
if_Country=2
if_Surrender=true
if_Plan=1
lifespan=tillTrigger
actionCountry=6
landAssets=15
setup=1
xyArea=173,66
$End

//#############################################
//1942 Declare war USSR plan 2 or if plan 1 fails to execute
$GatherLand
if_Date=6/1/1942
if_Country=4
if_Alliance=Neutral
//Axis have enough land units around Warsaw
landUnitInRadius=173,60,30,8,Axis
lifespan=tillTrigger
actionCountry=6
targetCountry=4
landAssets=30
attackOnlyInClear
setup=0
xyArea=172,67
$End

//Italy declares war on France
$GatherLand
if_Date=1/1/1939
if_Country=7
if_Alliance=Axis
lifespan=tillTrigger
actionCountry=7
targetCountry=2
landAssets=1
hqAsset
setup=1
attackOnlyInClear
xyArea=150,43
$End

//Italy declares war on UK
$GatherLand
if_Date=1/1/1939
if_Country=7
if_Alliance=Axis
lifespan=tillTrigger
actionCountry=7
targetCountry=1
landAssets=4
setup=1
attackOnlyInClear
xyArea=178,13
$End

//Italy declares war On Russia
$GatherLand
if_Date=1/1/1941
if_Country=4
if_Alliance=Allies
lifespan=tillTrigger
actionCountry=7
targetCountry=4
landAssets=1
attackOnlyInClear
setup=1
xyArea=173,57
$End

//move UK units to south of UK so USA forces may land
$GatherLand
if_Date=1/1/1941
if_Country=3
if_Alliance=Allies
lifespan=tillTrigger
actionCountry=1
landAssets=12
setup=2
xyArea=134,59
$End

//move UK units to south of UK so USA forces may land
$GatherLand
if_Date=1/1/1943
if_Country=3
if_Alliance=Allies
lifespan=tillTrigger
actionCountry=1
landAssets=12
setup=2
xyArea=136,62
$End

//Gather USA forces at Tunis and Tripoli for invading Italy
$GatherLand
if_Date=1/1/1943
if_Country=3
if_Alliance=Allies
//Tunis
xyControl=154,23,Allies
//Tripoli
xyControl=160,14,Allies
lifespan=tillTrigger
actionCountry=3
landAssets=6
setup=4
xyArea=161,12
$End

//Gather USA forces at Tunis and Tripoli for invading Italy
$GatherLand
if_Date=3/1/1943
if_Country=3
if_Alliance=Allies
//Tunis
xyControl=154,23,Allies
//Tripoli
xyControl=160,14,Allies
lifespan=tillTrigger
actionCountry=3
landAssets=6
setup=4
xyArea=154,23
$End

//UK DOW on Vichy North Africa if Tripoli taken
$GatherLand
if_Date=1/1/1941
if_Country=3
if_Alliance=Allies
//Algiers
xyControl=142,23,Neutral
//Tripoli
xyControl=160,14,Allies
lifespan=tillTrigger
actionCountry=1
targetCountry=55
landAssets=6
setup=2
xyArea=157,13
$End

//Take Tunis after if Vichy North Africa joins either side
$GatherLand
if_Date=1/1/1940
if_Country=55
if_Alliance=Axis
landUnitInRadius=160,14,3,4,Axis
lifespan=tillTrigger
actionCountry=6
landAssets=3
hqAsset
setup=1
xyArea=154,23
$End

$GatherLand
if_Date=1/1/1940
if_Country=55
if_Alliance=Allies
landUnitInRadius=160,14,3,4,Axis
lifespan=tillTrigger
actionCountry=6
targetCountry=55
landAssets=3
hqAsset
setup=1
xyArea=154,23
$End

//Move Germans down to Italy once Allies invade
$GatherLand
if_Date=1/1/1943
//Sicily
landUnitInRadius=163,26,1,5,Allies
lifespan=tillTrigger
actionCountry=6
landAssets=2
setup=4
xyArea=163,33
$End

//Move Germans down to Italy once Allies invade
$GatherLand
if_Date=1/1/1943
//Sicily
xyControl=160,26,Allies
xyControl=162,24,Allies
xyControl=162,26,Allies
xyControl=163,26,Allies
xyControl=166,29,Allies
xyControl=167,32,Allies
xyControl=165,33,Allies
xyControl=162,32,Allies
xyControl=162,33,Allies
xyControl=165,33,Allies
lifespan=tillTrigger
actionCountry=6
hqAsset
landAssets=3
setup=4
xyArea=160,36
$End

//Move Germans down to Italy once Allies invade
$GatherLand
if_Date=1/1/1943
//France
xyControl=130,51,Allies
xyControl=135,53,Allies
xyControl=138,44,Allies
xyControl=133,50,Allies
xyControl=134,48,Allies
xyControl=135,46,Allies
lifespan=tillTrigger
actionCountry=6
hqAsset
landAssets=6
setup=4
xyArea=140,51
$End
